import Router from 'koa-router';
import Ai from "../../controller/aiRsp";
import AiGoodsControlle from '../../controller/dlyadmin/aiGoodsControlle'
import toolsControlle from "../../controller/toolsControlle";
import AiFuncsConfigControlle from '../../controller/dlyadmin/aiFuncsConfig'
const router = new Router();

router.prefix('/api/zhangfuai');

router
  /**
   * @swagger
   * /api/zhangfuai/aiRsp:
   *   post: 
   *     description: ai创建接口 
   *     tags: [AI_API接口] 
   *     summary: "ai创建接口"
   *     parameters:
   *             - in: body
   *               name: api
   *               description: 接口名称
   *               required: true
   *             - in: body
   *               name: query
   *               description: 生成条件
   *               required: true
   *             - in: body
   *               name: ai_order_id
   *               description: 订单id
   *               required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .post('/aiRsp', Ai.AiRsq)
  /**
   * @swagger
   * /api/zhangfuai/aiRspRs:
   *   post: 
   *     description: ai获取不需要验证的接口
   *     tags: [AI_API接口] 
   *     summary: "ai获取不需要验证的接口"
   *     parameters:
   *             - in: body
   *               name: api
   *               description: 接口名称
   *               required: true
   *             - in: body
   *               name: query
   *               description: 生成条件
   *               required: true
   *             - in: body
   *               name: ai_order_id
   *               description: 订单id
   *               required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .post('/aiRspRs', Ai.aiRspRs)
  /**
   * @swagger
   * /api/zhangfuai/cretedOrder:
   *   post: 
   *     description: 创建生成订单 
   *     tags: [AI_API接口] 
   *     summary: "创建生成订单"
   *     parameters:
   *             - in: body
   *               name: func_type
   *               description: 功能类型
   *               required: true
   *             - in: body
   *               name: func_name
   *               description: 功能名称
   *               required: true
   *             - in: body
   *               name: sys_type
   *               description: 系统类型
   *               required: true
   *             - in: body
   *               name: shop_id
   *               description: 店铺id
   *               required: false
   *             - in: body
   *               name: image_num
   *               description: 图片数量
   *               required: false
   *             - in: body
   *               name: info_key
   *               description: 订单id
   *               required: false
   *             - in: body
   *               name: goods_id
   *               description: 商品id
   *               required: false
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .post('/cretedOrder', Ai.cretedOrder)
  /**
   * @swagger
   * /api/zhangfuai/priceConfigList:
   *   get: 
   *     description: 获取价格配置列表 
   *     tags: [AI_API接口] 
   *     summary: "获取价格配置列表"
   *     parameters:
   *             - in: query
   *               name: func_type
   *               description: 上架状态
   *               required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .get('/priceConfigList', AiGoodsControlle.list)
  /**
   * @swagger
   * /api/zhangfuai/getAiOrders:
   *   get: 
   *     description: 获取创建记录 
   *     tags: [AI_API接口] 
   *     summary: "获取创建记录"
   *     parameters:
   *             - in: query
   *               name: page
   *               description: 页码
   *               required: true
   *             - in: query
   *               name: pageSize
   *               description: 每页条数
   *               required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .get('/getAiOrders', Ai.getAiOrders)
  /**
   * @swagger
   * /api/zhangfuai/tools/ossBordSts:
   *   get: 
   *     description: 获取OSSKEY 
   *     tags: [AI_API接口] 
   *     summary: "获取创建记录"
   *     parameters:
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .get('/tools/ossBordSts', toolsControlle.ossSts)

  /**
   * @swagger
   * /api/zhangfuai/saveCreted:
   *   post: 
   *     description: 保存生成结果 
   *     tags: [AI_API接口] 
   *     summary: "创建生成订单"
   *     parameters:
   *             - in: body
   *               name: id
   *               description: 订单ID
   *               required: true
   *             - in: body
   *               name: image_list
   *               description: 功能名称
   *               required: true
   *               type: array
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .post('/saveCreted', Ai.saveCreted)
  /**
 * @swagger
 * /api/zhangfuai/funclist:
 *   post: 
 *     description: 保存生成结果 
 *     tags: [AI_API接口] 
 *     summary: "创建生成订单"
 *     parameters:
 *             - in: body
 *               name: status
 *               description: 启用状态
 *               required: true
 *     produces: 
 *       - application/json 
 *     responses: 
 *       200:
 *         description: 获取数据列表 
 * */
  .get('/funclist', AiFuncsConfigControlle.list)


export default router;